<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use \think\Route;

// Index Route
Route::get('/', 'index/index/index');
Route::get('pass', 'index/index/index');
Route::post('pass', 'index/index/pass');
Route::get('roll', 'index/index/roll');
Route::get('add', 'index/index/add');
Route::get('getname', 'index/index/getname');
Route::get('getstu', 'index/index/getstu');
Route::post('save', 'index/index/save');

// Login Route
Route::get('login', 'index/login/index');
Route::post('logindo', 'index/login/logindo');
Route::get('logout', 'index/login/logout');

// Score Route
Route::get('score/row/:id', 'index/score/scorerow', [], ['id' => '\d+']);
Route::get('score/create', 'index/score/add');
Route::get('score', 'index/score/index');
Route::post('score', 'index/score/save');
Route::put('score/:id$', 'index/score/update', [], ['id' => '\d+']);
Route::delete('score/:id$', 'index/score/delete', [], ['id' => '\d+']);

// User Route
Route::get('user/:id$', 'index/user/read', [], ['id' => '\d+']);
Route::get('user/:name$', 'index/user/name', [], ['name' => '[^\s]+']);
Route::get('user/:id/edit', 'index/user/edit', ['ext' => 'html'], ['id' => '\d+']);
Route::get('user/create', 'index/user/create');
Route::get('user/getname', 'index/user/getname');
Route::get('user', 'index/user/index');
Route::post('user', 'index/user/save');
Route::delete('user/:id$', 'index/user/delete', [], ['id' => '\d+']);
Route::put('user/status/:id', 'index/user/status', [], ['id' => '\d+']);
Route::put('user/:id$', 'index/user/update', [], ['id' => '\d+']);
Route::put('user/:id/sclass', 'index/user/shiftclass', [], ['id' => '\d+']);
Route::put('user/:id/cclass', 'index/user/changeclass', [], ['id' => '\d+']);

// Group Route
Route::get('group', 'index/group/index');
Route::post('group', 'index/group/save');
Route::put('group/coverChange', 'index/group/coverChange');
Route::put('group/statusChange', 'index/group/statusChange');
Route::delete('group/:id$', 'index/group/delete', [], ['id' => '\d+']);

// hide Route
Route::get('aaaaa', 'index/user/hide');
Route::get('createadmin', 'index/user/createadmin');
Route::get('admin/:id$', 'index/user/admin', [], ['id' => '\d+']);
Route::post('saveadmin', 'index/user/saveadmin');
Route::post('resetpass', 'index/user/resetpass');
Route::post('adminpass', 'index/user/adminpass');
